﻿using System;
using System.Windows.Forms;

namespace DCS.AdministrationClient.Forms
{
    public partial class GreetingsForm : Form
    {
        public GreetingsForm()
        {
            InitializeComponent();
        }

        private void ButtonTaskManagerClick(object sender, EventArgs e)
        {
            var taskManager = new TaskManagerForm();
            taskManager.Show();

            Hide();
        }

        private void ButtonPerformanceClick(object sender, EventArgs e)
        {
            var monitor = new MonitoringForm();
            monitor.Show();

            Hide();
        }

        private void ButtonMonitoringClick(object sender, EventArgs e)
        {
            var preferences = new PreferencesForm();
            preferences.Show();

            Hide();
        }

        private void ButtonTaskManagerMouseMove(object sender, MouseEventArgs e)
        {
            labelChoice.Text = "Менеджер задач";
            labelChoice.Left = groupBox.Width/2 - labelChoice.Width/2;
        }

        private void ButtonPerformanceMouseMove(object sender, MouseEventArgs e)
        {
            labelChoice.Text = "Мониторинг активности клиентов";
            labelChoice.Left = groupBox.Width/2 - labelChoice.Width/2;
        }

        private void ButtonMonitoringMouseMove(object sender, MouseEventArgs e)
        {
            labelChoice.Text = "Настройка параметров сервиса";
            labelChoice.Left = groupBox.Width/2 - labelChoice.Width/2;
        }

        private void OnMouseLeave(object sender, EventArgs e)
        {
            labelChoice.Text = "";
        }

        private void GreetingsFormLoad(object sender, EventArgs e)
        {
            Activate();
        }

        private void GreetingsForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }
    }
}